package com.scau.service.impl.business;

import java.io.Serializable;

import org.springframework.stereotype.Component;

import com.scau.exception.BusinessException;
import com.scau.model.business.Rule;
import com.scau.service.BaseService;

@Component
public class RuleService extends BaseService<Rule> implements Serializable {
	public void save(Rule rule) throws BusinessException {
		if (null != rule) {
			if (null != rule.getId() && 0 != rule.getId()) {
				update(rule);
			} else {
				add(rule);
			}
		} else {
			throw new BusinessException("Rule为空对象。");
		}
	}
}
